package transactionManagerService

import "hc_server/routers/models"

type TransactionManager struct {
	MerchantId int //商户id
	AgentId    int //代理商id
	Index      int
	Size       int
	Sort       int //排序:1=总额降序,2=总额升序,3=数量降序,4=数量升序
}

// TransactionManagerMerchantList 获取代理商交易列表
func (t *TransactionManager) TransactionManagerMerchantList() (map[string]interface{}, error) {
	return models.TransactionManagerMerchantList(t.AgentId, t.Index, t.Size, t.Sort)
}

// TransactionManagerTransactionList 交易列表
func (t *TransactionManager) TransactionManagerTransactionList() (map[string]interface{}, error) {
	return models.TransactionManagerTransactionList(t.MerchantId, t.Index, t.Size)
}

// TransactionManagerTransactionInfo 获取交易详情
func (t *TransactionManager) TransactionManagerTransactionInfo() (any, error) {
	return models.TransactionManagerTransactionInfo(t.MerchantId)
}
